package com.zjs.pojo;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * 
 * @TableName book
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("book")
@Document(indexName = "book",shards=1,replicas=1)
public class Book implements Serializable {

    @TableId(type = IdType.AUTO)
    @Id
    private Integer bookId;
    private Integer userId;
    /**
     * 用户名
     */
    @TableField(exist = false)
    private String userName;

    /**
     * 密码
     */
    @TableField(exist = false)
    private String userPassword;

    /**
     * 手机号
     */
    @TableField(exist = false)
    private String userTel;

    /**
     * 用户区别：1管理员、2普通用户
     */
    @TableField(exist = false)
    private Integer userDistinction;
    @TableField(exist = false)
    private String createTime ;

    /**
     * 文章名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_smart")
    private String bookName;

    /**
     * 文章发布日期
     */
    private Date bookCreatetime;

    /**
     * 文章内容
     */
    private String bookContent;

    /**
     * 点赞数量
     */
    private Integer bookGivenumber;

    /**
     * 访问数量
     */
    private Integer bookVisitnumber;

    /**
     * 是否关注 1关注0未关注
     */
    private Integer bookAttention;

    /**
     * 收藏数量
     */
    private Integer bookCollect;

    /**
     * 专辑
     */
    private String bookAlbum;

    /**
     * 标签
     */
    private String bookLabel;

    /**
     * 图片
     */
    private String bookImgurl;

    /**
     * 头像
     */
    private String bookHeadimg;


    private Integer bookEsflag;



}